package com.yang.studentsapp;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ImageView;
import android.widget.Toast;

import com.bumptech.glide.Glide;


/**
 * Created by Administrator on 2016/10/12.
 */
public  class SocietyBigPic extends BaseSociety{


    public SocietyBigPic(CampusSociety society, Context context) {
        super(society, context);
    }

    @Override
    protected View inflaterLayout(LayoutInflater inflater) {
        return inflater.inflate(R.layout.item_society_listview_2,null,false);
    }

    @Override
    protected void setListener(ViewHolder viewHolder) {
//        viewHolder.setOnclickListener(R.id.item_small_top_pic);
        mConvertView.setOnClickListener(viewHolder);
    }

    @Override
    public void onClickBack(View v, int position, ViewHolder holder) {
        Toast.makeText(mContext,""+position,Toast.LENGTH_SHORT).show();
    }

    @Override
    public void setData(CampusSociety society) {
        super.setData(society);
        ImageView imageView = mViewHolder.getView(R.id.big_right_pic);
        Glide.with(mContext).load(UrlConstant.BASE+society.getPicUrls().get(0))
                .placeholder(R.mipmap.ic_launcher).into(imageView);
    }
}
